<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="仓鼠的个人官网 - 一枚Java程序猿的网站。分享学习生涯成果，包含程序员专业知识、部落仓鼠工具、仓鼠博客和API服务。">
    <meta name="keywords" content="仓鼠,Java程序员,部落冲突机器人,博客,API服务,编程工具">
    <title>仓鼠の官网 | 一枚Java程序猿的网站</title>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #ff6b6b;
            --secondary-color: #4ecdc4;
            --dark-color: #292f36;
            --light-color: #f7fff7;
            --accent-color: #ffd166;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Noto Sans SC', sans-serif;
            background-color: var(--dark-color);
            color: var(--light-color);
            line-height: 1.6;
            overflow-x: hidden;
            background-image:
                linear-gradient(rgba(41, 47, 54, 0.9), rgba(41, 47, 54, 0.9)),
                url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h20v20H0z" fill="none"/><path d="M10 10h1v1h-1z" fill="rgba(255,255,255,0.05)"/></svg>');
            background-size: 20px 20px;
        }

        .loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--dark-color);
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            z-index: 9999;
            transition: opacity 0.5s ease;
        }

        .loading-screen.hidden {
            opacity: 0;
            pointer-events: none;
        }

        .loader {
            width: 48px;
            height: 48px;
            border: 5px solid var(--primary-color);
            border-bottom-color: transparent;
            border-radius: 50%;
            display: inline-block;
            box-sizing: border-box;
            animation: rotation 1s linear infinite;
        }

        @keyframes rotation {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        header {
            padding: 2rem;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .header-content {
            position: relative;
            z-index: 2;
        }

        h1 {
            font-size: 3rem;
            margin-bottom: 1rem;
            background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: fadeInDown 1s ease;
        }

        .title-subtext {
            font-size: 1.2rem;
            opacity: 0.8;
            margin-bottom: 2rem;
            animation: fadeIn 1.5s ease;
        }

        .hamster-icon {
            font-size: 4rem;
            margin-bottom: 1rem;
            animation: bounce 2s infinite;
            color: var(--accent-color);
        }

        @keyframes bounce {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-20px);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 0.8;
            }
        }

        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        nav {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin: 2rem 0;
            flex-wrap: wrap;
        }

        .nav-link {
            color: var(--light-color);
            text-decoration: none;
            font-weight: 500;
            padding: 0.5rem 1rem;
            border-radius: 50px;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .nav-link::before {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 0;
            height: 2px;
            background-color: var(--primary-color);
            transition: width 0.3s ease;
        }

        .nav-link:hover::before {
            width: 100%;
        }

        .nav-link:hover {
            color: var(--primary-color);
        }

        .main-content {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem;
        }

        section {
            margin-bottom: 4rem;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.6s ease;
        }

        section.visible {
            opacity: 1;
            transform: translateY(0);
        }

        h2 {
            font-size: 2rem;
            margin-bottom: 1.5rem;
            color: var(--secondary-color);
            position: relative;
            display: inline-block;
        }

        h2::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 50%;
            height: 3px;
            background: linear-gradient(to right, var(--primary-color), transparent);
        }

        p {
            margin-bottom: 1.5rem;
            font-size: 1.1rem;
        }

        .projects {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 2rem;
        }

        .project-card {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            padding: 1.5rem;
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
        }

        .project-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
            border-color: var(--primary-color);
        }

        .project-title {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--accent-color);
        }

        .project-link {
            display: inline-block;
            margin-top: 1rem;
            color: var(--primary-color);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .project-link:hover {
            color: var(--secondary-color);
        }

        .project-link i {
            margin-left: 0.5rem;
        }

        footer {
            text-align: center;
            padding: 2rem;
            background: rgba(0, 0, 0, 0.2);
            margin-top: 3rem;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin: 1rem 0;
        }

        .social-link {
            color: var(--light-color);
            font-size: 1.5rem;
            transition: all 0.3s ease;
        }

        .social-link:hover {
            color: var(--primary-color);
            transform: scale(1.2);
        }

        .bg-animation {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            opacity: 0.1;
        }

        @media (max-width: 768px) {
            h1 {
                font-size: 2rem;
            }

            .title-subtext {
                font-size: 1rem;
            }

            nav {
                flex-direction: column;
                align-items: center;
                gap: 1rem;
            }

            .projects {
                grid-template-columns: 1fr;
            }
        }

        /* 图片懒加载样式 */
        .lazy-img {
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .lazy-img.loaded {
            opacity: 1;
        }
    </style>
</head>

<body>
    <!-- 加载动画 -->
    <div class="loading-screen">
        <div class="loader"></div>
        <p>正在加载仓鼠の官网...</p>
    </div>

    <!-- 背景动画 -->
    <canvas id="bg-animation" class="bg-animation"></canvas>

    <header>
        <div class="header-content">
            <div class="hamster-icon">
                <i class="fas fa-hamster"></i>
            </div>
            <h1>仓鼠の官网</h1>
            <p class="title-subtext">一枚Java程序猿的网站</p>

            <nav>
                <a href="#about" class="nav-link">关于我</a>
                <a href="#projects" class="nav-link">我的项目</a>
                <a href="https://yzycoc.com/blog" class="nav-link" target="_blank">博客</a>
                <a href="https://yzycoc.com/qq" class="nav-link" target="_blank">部落工具</a>
                <a href="https://yzycoc.com/i" class="nav-link" target="_blank">API服务</a>
            </nav>
        </div>
    </header>

    <main class="main-content">
        <section id="about" class="about-section">
            <h2>关于仓鼠</h2>
            <p>欢迎来到仓鼠の官网！我是一名热爱编程的Java开发者，专注于创造有用的工具和分享技术知识。</p>
            <p>这个网站记录了我的学习历程和开发成果，包含程序员方向的专业知识分享，以及我开发的各种实用工具。</p>
            <p>在这里你可以找到：</p>
            <ul>
                <li>部落冲突相关的自动化工具</li>
                <li>技术博客和编程教程</li>
                <li>实用的API服务</li>
                <li>开源项目分享</li>
            </ul>
        </section>

        <section id="projects" class="projects-section">
            <h2>我的项目</h2>
            <div class="projects">
                <div class="project-card">
                    <h3 class="project-title">部落仓鼠工具</h3>
                    <p>为部落冲突玩家开发的实用工具集合，包含QQ/微信群机器人和阵型库功能。</p>
                    <a href="https://yzycoc.com/qq" class="project-link" target="_blank">
                        访问项目
                        <i class="fas fa-external-link-alt"></i>
                    </a>
                </div>

                <div class="project-card">
                    <h3 class="project-title">仓鼠的博客</h3>
                    <p>记录我的技术学习和开发经验，分享编程知识和实用技巧。</p>
                    <a href="https://yzycoc.com/blog" class="project-link" target="_blank">
                        访问博客
                        <i class="fas fa-external-link-alt"></i>
                    </a>
                </div>

                <div class="project-card">
                    <h3 class="project-title">仓鼠API服务</h3>
                    <p>提供各种实用的API接口服务，支持开发者快速集成到自己的项目中。</p>
                    <a href="https://yzycoc.com/i" class="project-link" target="_blank">
                        访问API
                        <i class="fas fa-external-link-alt"></i>
                    </a>
                </div>
            </div>
        </section>
    </main>

    <footer>
        <div class="social-links">
            <a href="#" class="social-link"><i class="fab fa-github"></i></a>
            <a href="#" class="social-link"><i class="fab fa-twitter"></i></a>
            <a href="#" class="social-link"><i class="fab fa-weixin"></i></a>
            <a href="#" class="social-link"><i class="fas fa-envelope"></i></a>
        </div>
        <p>&copy; 2023 仓鼠の官网. 保留所有权利.</p>
    </footer>

    <script>
        // 加载完成后隐藏加载动画
        window.addEventListener('load', function () {
            setTimeout(function () {
                document.querySelector('.loading-screen').classList.add('hidden');
            }, 500);

            // 背景动画初始化
            initBackgroundAnimation();

            // 懒加载图片
            lazyLoadImages();

            // 滚动动画
            initScrollAnimation();
        });

        // 背景动画
        function initBackgroundAnimation() {
            const canvas = document.getElementById('bg-animation');
            const ctx = canvas.getContext('2d');

            function resizeCanvas() {
                canvas.width = window.innerWidth;
                canvas.height = window.innerHeight;
            }

            window.addEventListener('resize', resizeCanvas);
            resizeCanvas();

            // 粒子系统
            const particles = [];
            const particleCount = Math.floor(window.innerWidth / 10);

            for (let i = 0; i < particleCount; i++) {
                particles.push({
                    x: Math.random() * canvas.width,
                    y: Math.random() * canvas.height,
                    size: Math.random() * 2 + 1,
                    speedX: Math.random() * 0.5 - 0.25,
                    speedY: Math.random() * 0.5 - 0.25
                });
            }

            function animate() {
                ctx.clearRect(0, 0, canvas.width, canvas.height);

                ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';

                for (let i = 0; i < particles.length; i++) {
                    const p = particles[i];

                    ctx.beginPath();
                    ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
                    ctx.fill();

                    p.x += p.speedX;
                    p.y += p.speedY;

                    if (p.x < 0 || p.x > canvas.width) p.speedX *= -1;
                    if (p.y < 0 || p.y > canvas.height) p.speedY *= -1;
                }

                requestAnimationFrame(animate);
            }

            animate();
        }

        // 懒加载图片
        function lazyLoadImages() {
            const lazyImages = document.querySelectorAll('.lazy-img');

            if ('IntersectionObserver' in window) {
                const imageObserver = new IntersectionObserver(function (entries, observer) {
                    entries.forEach(function (entry) {
                        if (entry.isIntersecting) {
                            const img = entry.target;
                            img.src = img.dataset.src;
                            img.classList.add('loaded');
                            imageObserver.unobserve(img);
                        }
                    });
                });

                lazyImages.forEach(function (img) {
                    imageObserver.observe(img);
                });
            } else {
                // 不支持IntersectionObserver的浏览器回退方案
                lazyImages.forEach(function (img) {
                    img.src = img.dataset.src;
                    img.classList.add('loaded');
                });
            }
        }

        // 滚动动画
        function initScrollAnimation() {
            const sections = document.querySelectorAll('section');

            function checkScroll() {
                sections.forEach(section => {
                    const sectionTop = section.getBoundingClientRect().top;
                    const windowHeight = window.innerHeight;

                    if (sectionTop < windowHeight * 0.75) {
                        section.classList.add('visible');
                    }
                });
            }

            window.addEventListener('scroll', checkScroll);
            window.addEventListener('resize', checkScroll);

            // 初始检查
            checkScroll();
        }
    </script>

    <!-- SEO优化: 结构化数据 -->
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "WebSite",
        "name": "仓鼠の官网",
        "url": "https://yzycoc.com",
        "description": "一枚Java程序猿的网站，分享编程知识、开发工具和技术博客。",
        "author": {
            "@type": "Person",
            "name": "仓鼠"
        }
    }
    </script>
</body>

</html>